package com.zhiyiang.controller;

import com.zhiyiang.service.user.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class LoginController {
    @Autowired
    private UserService userService;

    @GetMapping(value = "/login/{username}/{password}")
    @ResponseBody
    public Integer login(@PathVariable(value = "username") String username,@PathVariable(value = "password") String password){
        Integer flag = userService.dologin(username, password);
        System.out.println(username);
        System.out.println(password);
        System.out.println(flag);
        return flag;
    }
}
